package com.slingshot.identitylibrary.scan.agent

import android.content.Context
import com.slingshot.identitylibrary.scan.IDScan
import com.slingshot.identitylibrary.scan.callback.IDScanCallback

class IDScanAgent(context: Context) {
    private var idScan: IDScan = IDScan(context)

    fun setFrequency(frequency: Long): IDScanAgent {
        idScan.settingFrequency = frequency
        return this
    }

    fun setTimeout(time: Long): IDScanAgent {
        idScan.settingTimeout = time
        return this
    }

    fun scanIdStart(idScanCallback: IDScanCallback) {
        idScan.start(idScanCallback)
    }

    fun scanIdStop() {
        idScan.stop()
    }

    fun release() {
        idScan.release()
    }
}